package com.starview.star.compiler.cafe.compile;

import com.starview.platform.data.type.IType;
import com.starview.platform.data.type.Location;
import com.starview.star.compiler.util.PrettyPrintable;

/**
 * This interface describes the Cafe type of an entity and the Java-related representation of the
 * entity.
 * 
 * @author fgm
 * 
 */
public interface ISpec extends PrettyPrintable
{
  /**
   * Return the location associated with this specification
   * 
   * @return a {@link Location}
   */
  Location getLoc();

  /**
   * Get the Cafe type of the source.
   * 
   * @return
   */
  IType getType();

  /**
   * Get the Java type of the source
   * 
   * @return
   */
  String getJavaType();

  /**
   * Get the Java signature of the source. This is usually equal to L+javaType+;
   * 
   * @return
   */
  String getJavaSig();

  /**
   * Get Java's invocation signature for the source - i.e., what to do to invoke the function
   * 
   * @return
   */
  String getJavaInvokeSig();

  /**
   * Get the java name of the method to invoke
   * 
   * @return
   */
  String getJavaInvokeName();

  /**
   * How many slots does this value take?
   * 
   * @return
   */
  int slotSize();
}
